package com.example.waterdispenserm2.activity;

import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import com.example.waterdispenserm2.base.BasicsActivity;
import com.example.waterdispenserm2.databinding.ActivityMoreBinding;

//菜单选择
public class MoreActivity extends BasicsActivity<ActivityMoreBinding> {
    @Override
    public void widgetClick(View v) {

    }

    @Override
    public void setListener() {

    }

    @Override
    public void initView() {
        binding.rl.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                setResult(RESULT_OK);
                finish();
            }
        });


        binding.rlLan.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivityForResult(new Intent(MoreActivity.this, LanguageActivity.class), 2);
            }
        });

        binding.rlNoodle.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                NoodleActivity.startActivity();
            }
        });

        binding.rlAttention.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                AttentionActivity.startActivity();
            }
        });

        binding.rlDescribe.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                MainActivity.startActivity();
            }
        });
    }

    @Override
    protected ActivityMoreBinding getViewBinding() {
        return ActivityMoreBinding.inflate(LayoutInflater.from(this));
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (resultCode == RESULT_OK) {
            recreate();
        }
    }

}